home *** CD-ROM | disk | FTP | other *** search
- #include "speech.proto.h"
- #include "rsdefs.h"
- #include <Speech.h>
-
-
- volatile Boolean gDoneSpeaking = false;
-
-
- void StopSpeaking(void)
- {
- do {
- if (!gCanSpeak) {
- break;
- }
-
- /* Get rid of the speech channel */
-
- if (nil != gSpeechChannel) {
- DisposeSpeechChannel(gSpeechChannel);
- gSpeechChannel = nil;
- }
-
- /* Get rid of the text buffer */
-
- if (nil != gSpeechText) {
- DisposeHandle(gSpeechText);
- gSpeechText = nil;
- }
-
- /* Fix the other globals */
-
- gDoneSpeaking = false;
- gSpeakingVoiceIndex = gNumberVoices;
-
- /* And fix the menus */
-
- AdjustSpeechMenu(gSpeakSelectionEnabled);
-
- } while (false);
- }
-